﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LDSP.BRL;
using BYFW.DAL;
using System.Data;

namespace LDSP.UI.EnterpriseAdmin
{
    public partial class MngTaskPlan : LDSP.BRL.BaseAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.grd_list.DataSource = GetMokedTaskPlan();
            this.grd_list.DataBind();
        }

        protected void btn_search_Click(object sender, EventArgs e)
        {
            this.grd_list.DataSource = GetMokedTaskPlanWithData();
            this.grd_list.DataBind();
        }

        private DataTable GetMokedTaskPlanWithData()
        {
            DataTable dt = GetMokedTaskPlan();
            dt.Rows.Add("1", "污染治理标准", "张三", "排污", "王五", DateTime.Now, "此任务紧急，务必准时完成", 1);

            return dt;
        }

        private DataTable GetMokedTaskPlan()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("id", typeof(string));
            dt.Columns.Add("name", typeof(string));
            dt.Columns.Add("responsibility", typeof(string));
            dt.Columns.Add("taskName", typeof(string));
            dt.Columns.Add("Person", typeof(string));
            dt.Columns.Add("ExpiredDT", typeof(DateTime));
            dt.Columns.Add("remark", typeof(string));
            dt.Columns.Add("Status", typeof(int));

            return dt;
        }

        protected void btn_close_Click(object sender, EventArgs e)
        {

        }

    }
}